// JavaScript Document
$(document).ready(function(){
	var files=new Array();
	var url="http://localhost/hello/Mini1.5/";
	$("pre[class^=brush]").each(function(i){
		var c=$(this).attr("class");
		var file=c.replace(/^brush:([a-z]+)\s*;?.*$/,"$1");
		file=file=="js"?"JScript":file;
		files.push("js/shBrush"+file+".js");
	});
	if(files.length>0){
		files=unique(files);
		$("<scri"+"pt>"+"</scr"+"ipt>").attr({src:url+"js/shCore.js",type:"text/javascript"}).appendTo("head");
		$("<link rel='stylesheet' type='text/css' href='"+url+"css/shCoreDefault.css' />").appendTo("head");
	$.each(files,function(name,value){		
		$("<scri"+"pt>"+"</scr"+"ipt>").attr({src:url+value,type:"text/javascript"}).appendTo("head");
	});
	SyntaxHighlighter.defaults['smart-tabs']=false;
	SyntaxHighlighter.all();
	}
});

function unique(data){ 
data = data || []; 
var a = {}; 
len = data.length; 
for (var i=0; i<len;i++){ 
var v = data[i]; 
if (typeof(a[v]) == 'undefined'){ 
a[v] = 1; 
} 
}; 
data.length=0; 
for (var i in a){ 
data[data.length] = i; 
} 
return data; 
}